Skip to content

Conversation

@omniverse
Copy link

Added config to build and test Typescript.

Converted src to TS (but not the tests yet).

}

export interface ResponsivePropsConfig {
propKeys: Array<string>;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Array<T> is used a couple times in this PR, but it's generally better to use T[].

thresholdMap: PropTypes.object,
/** @ignore */
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't propTypes be replaced with interfaces?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically they are not identical and still have value in non-TS apps. I was trying to change as little functionality as possible in this PR.

"esModuleInterop": true,
"preserveSymlinks": true,
"baseUrl": ".",
"outDir": "./dist"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this build to both common-js and es-modules?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only cjs

omniverse and others added 4 commits June 16, 2020 11:07
Co-authored-by: Jordan Janzen <[email protected]>
Co-authored-by: Jordan Janzen <[email protected]>
Co-authored-by: Jordan Janzen <[email protected]>
Co-authored-by: Jordan Janzen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants